package swipe;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.view.View;

import swipe.painter.ArrowPainter;
import swipe.painter.DebugPainter;
import swipe.painter.MaskPainter;
import swipe.painter.Painter;

import java.util.Arrays;
import java.util.List;

@SuppressLint({"ViewConstructor"})
/* compiled from: SwipeIndicator.kt */
public final class SwipeIndicator extends View {
    final MaskPainter maskPainterL;
    final ArrowPainter arrowPainterL;
    final DebugPainter debugPainter;
    final MaskPainter maskPainterR;
    final ArrowPainter arrowPainterR;
    private final List<Painter> painters;

    public SwipeIndicator(Context context) {
        super(context);
        maskPainterL = new MaskPainter(false);
        arrowPainterL = new ArrowPainter(false);
        maskPainterR = new MaskPainter(true);
        arrowPainterR = new ArrowPainter(true);
        debugPainter = new DebugPainter();
        painters = Arrays.asList(maskPainterL, arrowPainterL, debugPainter, maskPainterR, arrowPainterR);
    }

    protected void onSizeChanged(int i, int i2, int i3, int i4) {
        super.onSizeChanged(i, i2, i3, i4);
        for (Painter painter : painters) {
            painter.a(i, i2);
        }
    }

    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        for (Painter painter : painters) {
            painter.a(canvas);
        }
    }

    public interface OnSwipe {
        void onSwipe();
    }
}
